import { Injectable, Logger } from '@nestjs/common';
import { Cron, CronExpression } from '@nestjs/schedule';
import loopTask from 'src/common/loopTask';

@Injectable()
export class ScheduleService {
  private readonly logger = new Logger(ScheduleService.name);

  // @Cron('45 * * * * *')
  @Cron(CronExpression.EVERY_10_HOURS)
  handleCron() {
    loopTask()
    this.logger.debug('Called when the current second is 45');
  }
}
